package com.zyg.daoImpl;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.zyg.dao.LoginDao;
import com.zyg.util.DBUtil;

public class LoginDaoImpl implements LoginDao{

	public boolean queryUser(String username, String password) {
		String sql = "select * from user where u_username=? and u_password = ? ";
		ResultSet rs = DBUtil.select(sql, new Object[] {username,password});
		try {
			while(rs.next()) {
				return true;
			}
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
	}

	
	
}
